<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>
    </h:head>
    <h:body>
        <ui:composition template="/WEB-INF/facelets/teacher_template.xhtml">
            <ui:define name="content">  
                <h:form id="theForm">

                    <p:dataTable id="lessonsTable" value="#{teacherLessonsBackingBean.lessons}" var="lesson"> 
                        <p:column  sortBy="#{lesson.startTime.getTime()}">  
                            <f:facet name="header">  
                                <h:outputText value="Start Time" />  
                            </f:facet>  
                            <h:outputText value="#{lesson.startTime.getTime()}" />  
                        </p:column>  

                        <p:column sortBy="#{lesson.endTime.getTime()}">  
                            <f:facet name="header">  
                                <h:outputText value="End Time" />  
                            </f:facet>  
                            <h:outputText value="#{lesson.endTime.getTime()}" />  
                        </p:column>  

                        <p:column sortBy="#{lesson.course.courseName}">
                            <f:facet name="header">  
                                <h:outputText value="Course" />  
                            </f:facet>  
                            <h:outputText value="#{lesson.course.courseName}" />  
                        </p:column>

                    </p:dataTable> 
                </h:form>
            </ui:define> 
        </ui:composition>
    </h:body>
</html>